{layout name="index/layout" /}        <!--content-->
<div class="log">
    <div class="clear"></div>
    <div class="query">
        <h5>消费信息</h5>
        <div class="form_search">
            <form action="sell.html" method="post">
                <div>
                    <label for="start_date">开始日期：</label>
                    <input id="start_date" type="text" name="start_date" value="{$date.start_date ?? ''}" readonly/>
                </div>
                <div>
                    <label for="end_date">结束日期：</label>
                    <input id="end_date" type="text" name="end_date" value="{$date.end_date ?? ''}" readonly/>
                </div>
                <div>
                    <input id="submit_search" class="submit_search" type="submit" value="搜索">
                    <input class="submit_search" type="button" value="刷新" onclick="location.reload()">
                    <span>{$ps ?? ''}</span>
                </div>
            </form>
        </div>
        <div class="table">
            <table id="table_main">
                <tr>
                    <th>消费时间</th>
                    <th>消费商品</th>
                    <th>消费金额</th>
                    <th>消费积分</th>
                    <th>门店</th>
                    <th>备注</th>
                </tr>
                {if $sells neq false}
                {foreach $sells as $sell}
                <tr class="table_query">
                    <td>{$sell.CreateDate|substr=0,-3}</td>
                    <td>
                        <button>点击展开</button>
                    </td>
                    <td>{$sell.TotalMoney}</td>
                    <td>{$sell.Point|round}</td>
                    <td>{$sell.personnel.Department}</td>
                    <td>{$sell.Remark}</td>
                </tr>
                <tr class="productID">
                    <td colspan="6">
                        <table class="product">
                            <tr>
                                <th>商品名</th>
                                <th>单价</th>
                                <th>折扣</th>
                                <th>数量</th>
                                <th>合计</th>
                                <th>备注</th>
                            </tr>
                            {foreach $sell.product as $goods}
                            <tr class="table_query">
                                <td>{$goods.Product}</td>
                                <td>{$goods.Price}</td>
                                <td>{$goods.Discount|round}%</td>
                                <td>{$goods.Number|round}</td>
                                <td>{$goods.Total}</td>
                                <td>{$goods.Remark}</td>
                            </tr>
                            {/foreach}
                        </table>
                    </td>
                </tr>
                {/foreach}
                {if $page eq null}
                {else}
                <tr class="table_query">
                    <td colspan="6">{$page}</td>
                </tr>
                {/if}
                {else}
                <tr>
                    <td colspan="5" class="table_not">没有查到消费信息</td>
                </tr>
                {/if}
            </table>
        </div>
    </div>
</div>
<div class="clear"></div>
<script>
    var action = document.getElementById('sell');
    action.className = 'action';
</script>